package xyz.jcat.dys.aweme.domain.document;

import lombok.Getter;
import lombok.Setter;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;
import xyz.jcat.common.enums.YesNoEnum;
import xyz.jcat.mongo.NumberIdDocument;

/**
 * 作品评论表
 */
@Getter
@Setter
@Document("aweme_comment")
public class AwemeCommentDocument extends NumberIdDocument<Long> {

    //评论用户id
    private Long userId;
    //评论作品id
    @Indexed
    private Long awemeId;
    //评论内容
    private String content;
    //回复评论id
    @Indexed
    private Long replyId = -1L;
    //回复的回复评论id
    private Long replyToReplyId = -1L;
    //回复的回复用户id
    private Long replyToUserId = -1L;
    //点赞数
    private Long diggs = 0L;
    //回复数
    private Long replies = 0L;

    private Integer isDel = YesNoEnum.NO.getCode();

    public static final String field_userId = "userId";
    public static final String field_awemeId = "awemeId";
    public static final String field_content = "content";
    public static final String field_replyId = "replyId";
    public static final String field_replyToReplyId = "replyToReplyId";
    public static final String field_replyToUserId = "replyToUserId";
    public static final String field_diggs = "diggs";
    public static final String field_replies = "replies";
    public static final String field_isDel = "isDel";

}
